var utils = require("./utils");
var packageMap = require("./packageMap");
Wang.main = function (appName) {
  if (appName) {
    utils.goHome();
    sleep(2 * 1000);
    console.log(appName, typeof appName);
    var packageName = packageMap[appName];
    if (packageName) {
      app.launch(packageName);
    } else {
      console.log(`${appName} 没有找到包名`);
      var res = app.launchApp(packageName);
      if (!res) {
        console.log(`${appName} 打开失败`);
      }
    }
  }
};
